#include <algorithm>
#include <cstdio>
#include <iostream>
#include <vector>

using std::cin;
using std::cout;
using std::vector;
using std::pair;

template <typename InputIterator, typename TKey>
pair <InputIterator, InputIterator> my_partition(InputIterator begin, InputIterator end,
                                                 TKey key) {
    auto left = begin;
    while (begin != end) {
        if (*begin < key) {
            iter_swap(left, begin);
            ++left;
        }
        ++begin;
    }
    auto right = begin = left;
    while (begin != end) {
        if (*begin == key) {
            iter_swap(right, begin);
            ++right;
        }
        ++begin;
    }
    return make_pair(left, right);
}

template <typename InputIterator>
void qsort(InputIterator begin, InputIterator end) {
    int length = end - begin;
    if (length <= 1) {
        return;
    }
    auto pair_middle = my_partition(begin, end, *(begin + rand() % length));
    qsort(begin, pair_middle.first);
    qsort(pair_middle.second, end);
}

void input(vector <int> &lst) {
    int n;
    cin >> n;
    lst.resize(n);
    for (int i = 0; i < n; i++) {
        cin >> lst[i];
    }
}

void output(const vector <int> &lst) {
    for (size_t i = 0; i < lst.size(); i++) {
        cout << lst[i] << ' ';
    }
}

int main() {
    vector <int> lst;
    input(lst);
    qsort(lst.begin(), lst.end());
    output(lst);
    return 0;
}
